﻿using System;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;
using System.Collections.ObjectModel;
using System.Xml.Linq;
using System.IO.IsolatedStorage;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Windows.Data;
using System.Windows.Media.Imaging;
using System.Collections.Generic;

namespace UI
{
    public partial class ChildWindow1 : UserControl
    {
        
        HyperlinkButton i;
        
        string[] data;
        public ChildWindow1(object a, bool auth)
        {
           Ellipse clickedPrinter = (Ellipse)a;
            data = clickedPrinter.Tag as string[];
            this.Loaded += new RoutedEventHandler(Child_Loaded);
            InitializeComponent();
        }       

        void Child_Loaded(object sender, RoutedEventArgs e)
        {
            DisplayListData();
        }
        private void DisplayListData()
        {
           
            i = new HyperlinkButton();
            i.Width = 82;
            i.Height = 29;
            BitmapImage bmimg = new BitmapImage();
            bmimg.UriSource = new Uri("installButton.png", UriKind.Relative);
            Image img = new Image();
            img.Source = bmimg;
            i.Content = img;
            i.NavigateUri = new Uri(data[0]);
            LayoutRoot.Children.Add(i);
            Canvas.SetTop(i, 0);
           

        }
        
    }

    
}

